package com.huawei.mall.modules.log.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 
 * </p>
 *
 * @author 元气小喵仙~
 * @since 2025-06-01
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("logs")
@ApiModel(value="Logs对象", description="")
public class Logs implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "日志主键 自动增长")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "所执行操作的用户id")
    private Long userId;

    @ApiModelProperty(value = "用户所执行的具体操作")
    private String action;

    @ApiModelProperty(value = "用户所执行的实体类型(users,course等) 可空")
    private String entityType;

    @ApiModelProperty(value = "实体id 结合 entity_type 字段可以准确定位到被操作的那个实体")
    private Long entityId;

    @ApiModelProperty(value = "记录操作的详细信息，如操作原因、参数等")
    private String details;

    @ApiModelProperty(value = "日志创建时间")
    @TableField("createTime")
    private LocalDateTime createtime;


}
